package com.obas.access.business.service.impl;

import java.util.List;

import com.ease.platform.access.service.impl.AbstractNamespaceAccessServiceImpl;
import com.obas.access.business.service.BusinessUsecaseAccessService;
import com.obas.model.business.BusinessUsecase;
import com.obas.model.business.criteria.BusinessUsecaseCriteria;

public class BusinessUsecaseAccessServiceImpl extends AbstractNamespaceAccessServiceImpl<BusinessUsecase> implements BusinessUsecaseAccessService {

	public List<BusinessUsecase> findByBusinessScenarioId(long businessScenarioId) {
		BusinessUsecaseCriteria parameter = new BusinessUsecaseCriteria();
		parameter.setBusinessScenarioId(businessScenarioId);
		return this.find(parameter);
	}

	@Override
	public BusinessUsecase createEntity(BusinessUsecase businessUsecase, long businessScenarioId) {
		businessUsecase.setBusinessScenarioId(businessScenarioId);
		businessUsecase = this.save(businessUsecase);
		return businessUsecase;
	}

}
